﻿using GameStructure.Contracts;
using GameStructure.Core;
using GameStructure.Types;
using Tao.OpenGl;

namespace GameStructure.GaneState
{
    public class TextTestState : IGameObject
    {
        private readonly Sprite _text = new Sprite();
        private readonly Renderer _renderer = new Renderer();

        public TextTestState(TextureManager textureManager)
        {
            _text.Texture = textureManager.Get("font");
            _text.SetUVs(new Point(0.113f, 0), new Point(0.171f, 0.101f));
            _text.SetWidth(15);
            _text.SetHeight(26);
        }

        public void Update(double elapsedTime)
        {
            
        }

        public void Render()
        {
            Gl.glClearColor(0.0f,0.0f,0.0f,1.0f);
            Gl.glClear(Gl.GL_COLOR_BUFFER_BIT);
            _renderer.DrawSprite(_text);
        }
    }
}
